home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / rexx / rexxmode10.lha / comint.elc < prev    next >
Text File  |  1992-08-16  |  24KB  |  379 lines

  1.  
  2. (provide (quote comint))
  3.  
  4. (defconst comint-version "2.03")
  5.  
  6. (defvar comint-prompt-regexp "^" "\
  7. Regexp to recognise prompts in the inferior process.
  8. Defaults to \"^\", the null string at BOL.
  9.  
  10. Good choices:
  11.   Canonical Lisp: \"^[^> ]*>+:? *\" (Lucid, franz, kcl, T, cscheme, oaklisp)
  12.   Lucid Common Lisp: \"^\\(>\\|\\(->\\)+\\) *\"
  13.   franz: \"^\\(->\\|<[0-9]*>:\\) *\"
  14.   kcl: \"^>+ *\"
  15.   shell: \"^[^#$%>]*[#$%>] *\"
  16.   T: \"^>+ *\"
  17.  
  18. This is a good thing to set in mode hooks.")
  19.  
  20. (defvar input-ring-size 30 "\
  21. Size of input history ring.")
  22.  
  23. (defvar comint-get-old-input (function comint-get-old-input-default) "\
  24. Function that submits old text in comint mode.
  25. This function is called when return is typed while the point is in old text.
  26. It returns the text to be submitted as process input.  The default is
  27. comint-get-old-input-default, which grabs the current line, and strips off
  28. leading text matching comint-prompt-regexp")
  29.  
  30. (defvar comint-input-sentinel (function ignore) "\
  31. Called on each input submitted to comint mode process by comint-send-input.
  32. Thus it can, for instance, track cd/pushd/popd commands issued to the csh.")
  33.  
  34. (defvar comint-input-filter (function (lambda (str) (not (string-match "\\`\\s *\\'" str)))) "\
  35. Predicate for filtering additions to input history.
  36. Only inputs answering true to this function are saved on the input
  37. history list. Default is to save anything that isn't all whitespace")
  38.  
  39. (defvar comint-input-sender (function comint-simple-send) "\
  40. Function to actually send to PROCESS the STRING submitted by user.
  41. Usually this is just 'comint-simple-send, but if your mode needs to 
  42. massage the input string, this is your hook. This is called from
  43. the user command comint-send-input. comint-simple-send just sends
  44. the string plus a newline.")
  45.  
  46. (defvar comint-eol-on-send (quote T) "\
  47. If non-nil, then jump to the end of the line before sending input to process.
  48. See COMINT-SEND-INPUT")
  49.  
  50. (defvar comint-mode-hook (quote nil) "\
  51. Called upon entry into comint-mode
  52. This is run before the process is cranked up.")
  53.  
  54. (defvar comint-exec-hook (quote nil) "\
  55. Called each time a process is exec'd by comint-exec.
  56. This is called after the process is cranked up.  It is useful for things that
  57. must be done each time a process is executed in a comint-mode buffer (e.g.,
  58. (process-kill-without-query)). In contrast, the comint-mode-hook is only
  59. executed once when the buffer is created.")
  60.  
  61. (defvar comint-mode-map nil)
  62.  
  63. (defun comint-mode nil "\
  64. Major mode for interacting with an inferior interpreter.
  65. Interpreter name is same as buffer name, sans the asterisks.
  66. Return at end of buffer sends line as input.
  67. Return not at end copies rest of line to end and sends it.
  68. Setting mode variable comint-eol-on-send means jump to the end of the line
  69. before submitting new input.
  70.  
  71. This mode is typically customised to create inferior-lisp-mode,
  72. shell-mode, etc.. This can be done by setting the hooks
  73. comint-input-sentinel, comint-input-filter, comint-input-sender and
  74. comint-get-old-input to appropriate functions, and the variable
  75. comint-prompt-regexp to the appropriate regular expression.
  76.  
  77. An input history is maintained of size input-ring-size, and
  78. can be accessed with the commands comint-next-input [\\[comint-next-input]] and 
  79. comint-previous-input [\\[comint-previous-input]]. Commands not keybound by
  80. default are send-invisible, comint-dynamic-complete, and 
  81. comint-list-dynamic-completions.
  82.  
  83. If you accidentally suspend your process, use \\[comint-continue-subjob]
  84. to continue it.
  85.  
  86. \\{comint-mode-map}
  87.  
  88. Entry to this mode runs the hooks on comint-mode-hook" (interactive) (byte-code "̈ÍÁΠ\"…ÏÁ!…     ЉˆÑ‰ˆÒ‰ˆÓ!ˆÔÈ!ˆÕ ‰ˆÔÉ!ˆÖ‰    ˆÔ×!ˆÔË!ˆÔÁ!ˆÔÊ!ˆØ‰
  89. ˆÔÙ!ˆÔÚ!ˆÔÛ!ˆÔÜ!ˆÔÝ!ˆÔÃ!ˆ
  90. ‰ˆÔÞ!ˆßà!ˆá!ƒ|‚€â !‰*‡" [old-ring input-ring old-ptyp comint-ptyp major-mode mode-name mode-line-process comint-mode-map comint-last-input-end comint-last-input-match input-ring-index input-ring-size nil assq buffer-local-variables boundp comint-mode "Comint" (": %s") use-local-map make-local-variable make-marker "" comint-prompt-regexp 0 comint-get-old-input comint-input-sentinel comint-input-filter comint-input-sender comint-eol-on-send comint-exec-hook run-hooks comint-mode-hook ring-p make-ring] 23))
  91.  
  92. (if comint-mode-map nil (setq comint-mode-map (make-sparse-keymap)) (define-key comint-mode-map "p" (quote comint-previous-input)) (define-key comint-mode-map "n" (quote comint-next-input)) (define-key comint-mode-map "s" (quote comint-previous-similar-input)) (define-key comint-mode-map "" (quote comint-send-input)) (define-key comint-mode-map "" (quote comint-delchar-or-maybe-eof)) (define-key comint-mode-map "" (quote comint-bol)) (define-key comint-mode-map "" (quote comint-kill-input)) (define-key comint-mode-map "" (quote backward-kill-word)) (define-key comint-mode-map "" (quote comint-interrupt-subjob)) (define-key comint-mode-map "" (quote comint-stop-subjob)) (define-key comint-mode-map "" (quote comint-quit-subjob)) (define-key comint-mode-map "" (quote comint-kill-output)) (define-key comint-mode-map "’" (quote comint-previous-input-matching)) (define-key comint-mode-map "" (quote comint-show-output)))
  93.  
  94. (defun full-copy-sparse-keymap (km) "\
  95. Recursively copy the sparse keymap KM" (byte-code ":ƒÂ@!ÂA!B‚‡" [km t full-copy-sparse-keymap] 4))
  96.  
  97. (defun comint-check-proc (buffer) "\
  98. True if there is a process associated w/buffer BUFFER, and
  99. it is alive (status RUN or STOP). BUFFER can be either a buffer or the
  100. name of one" (byte-code "    !…Ã!Ä>)‡" [proc buffer get-buffer-process process-status (run stop)] 4))
  101.  
  102. (defun make-comint (name program &optional startfile &rest switches) (byte-code "ÅÆ    ÆQ!Ç!?…ŠqˆÈ )ˆÉ    
  103. %ˆ)‡" [buffer name program startfile switches get-buffer-create "*" comint-check-proc comint-mode comint-exec] 9))
  104.  
  105. (defvar comint-ptyp t "\
  106. True if communications via pty; false if by pipe. Buffer local.
  107. This is to work around a bug in emacs process signalling.")
  108.  
  109. (defun comint-exec (buffer name command startfile switches) "\
  110. Fires up a process in buffer for comint modes.
  111. Blasts any old process running in the buffer. Doesn't set the buffer mode.
  112. You can use this to cheaply run a series of processes in the same comint
  113. buffer. The hook comint-exec-hook is run after each exec." (byte-code "ŠqˆÈ!    …É    !)ˆÊ
  114. $ËÅ!ˆ‰ˆdbˆÌÍ    !`\"ˆ…NÎÏ!ˆdbˆÐ!ˆÑ`d\"‰ˆÒ`d\"ˆÓ    \"ˆÔÕ!ˆ))‡" [buffer proc name command switches comint-ptyp process-connection-type startfile get-buffer-process delete-process comint-exec-1 make-local-variable set-marker process-mark sleep-for 1 insert-file-contents buffer-substring delete-region comint-send-string run-hooks comint-exec-hook] 13))
  115.  
  116. (defun comint-exec-1 (name buffer command switches) (byte-code "ÈÀ!ƒÉÊËÌ \"ÍÎE\"ÏР   
  117. %)‚IÑÒ!ÑÓ!ÑÔ!ՎÖÒÊ×Ì \"\"ˆÖÓØ\"ˆÖÔÙ\"ˆÏР   
  118. %)+‡" [process-environment name buffer command switches tcapv termv emv boundp comint-update-env format "TERMCAP=emacs:co#%d:tc=unknown" screen-width "TERM=emacs" "EMACS=t" apply start-process getenv "TERMCAP" "TERM" "EMACS" ((byte-code "ÃÄ\"ˆÃÅ    \"ˆÃÆ
  119. \"‡" [tcapv termv emv setenv "TERMCAP" "TERM" "EMACS"] 5)) setenv "emacs:co#%d:tc=unknown" "emacs" "t"] 19))
  120.  
  121. (defun comint-update-env (old-env new) (byte-code "Æ    !ÇÈ    \" …C @ÉÊ \"… ËÌË!O A‰ˆ…+Í
  122. \"?…>…8
  123. B‰ˆ B‰*ˆ‚    ˆÎ!*‡" [ans new vars old-env vv var reverse mapcar (lambda (vv) (byte-code "ÁÂ\"…ÃÄÃ!O‡" [vv string-match "^[^=]*=" 0 match-end] 5)) string-match "^[^=]*=" 0 match-end comint-mem nreverse] 8))
  124.  
  125. (defun comint-mem (item list &optional elt=) "\
  126. Test to see if ITEM is equal to an item in LIST.
  127. Option comparison function ELT= defaults to equal." (byte-code "†ÅK …    ?…)Æ @#ƒ! ‰‚% A‰ˆ‚    ˆ    *‡" [elt= done nil list item equal funcall] 6))
  128.  
  129. (defun ring-p (x) "\
  130. T if X is a ring; NIL otherwise." (byte-code ":…Á@!…A:…ÁA@!…ÂAA!‡" [x integerp vectorp] 4))
  131.  
  132. (defun make-ring (size) "\
  133. Make a ring that can contain SIZE elts" (byte-code "ÂÃÄÂ\\Á\"BB‡" [size nil 1 0 make-vector] 5))
  134.  
  135. (defun ring-plus1 (index veclen) "\
  136. INDEX+1, with wraparound" (byte-code "    Ã\\
  137. UƒĂ)‡" [new-index index veclen 1 0] 2))
  138.  
  139. (defun ring-minus1 (index veclen) "\
  140. INDEX-1, with wraparound" (byte-code "ÂUƒ
  141.     ‚ ÃZ‡" [index veclen 0 1] 2))
  142.  
  143. (defun ring-length (ring) "\
  144. Number of elts in the ring." (byte-code "    @    A@    AAG
  145. Xā
  146. Z\\‚!ÆÅ
  147. Z# Uƒ,ǂ- )+‡" [hd ring tl siz len 1 + 0] 5))
  148.  
  149. (defun ring-empty-p (ring) (byte-code "ÁÂ!U‡" [ring 0 ring-length] 3))
  150.  
  151. (defun ring-insert (ring item) "\
  152. Insert a new item onto the ring. If the ring is full, dump the oldest
  153. item to make room." (byte-code "    AAGÅ    @
  154. \"Æ     \"ˆ IˆÇ    !…'Æ    AÅ    A@
  155. \"\"+‡" [vec ring len new-hd item ring-minus1 setcar ring-empty-p] 8))
  156.  
  157. (defun ring-remove (ring) "\
  158. Remove the oldest item retained on the ring." (byte-code "Ã!ƒ ÄÅ!‚\"A@AAÆAÇ    
  159. G\"\"ˆ
  160.     H*‡" [ring tl vec ring-empty-p error "Ring empty" set-car ring-minus1] 7))
  161.  
  162. (defun ring-rotate (ring n) (byte-code "ÆU?…wÇ    !ƒÈÉ!‚w    @    A@    AA GÆV…EÊ \"‰ˆ         
  163. HIˆÊ
  164. \"‰ˆËZ‰ˆ‚!ˆÆW…jÌ
  165. \"‰ˆ
  166. HIˆÌ \"‰ˆËZ‰ˆ‚F)ˆÍ    
  167. \"ˆÍ    A \"+‡" [n ring hd tl vec len 0 ring-empty-p error "ring empty" ring-plus1 1 ring-minus1 set-car] 10))
  168.  
  169. (defun comint-mod (n m) "\
  170. Returns N mod M. M is positive. Answer is guaranteed to be non-negative, 
  171. and less than m." (byte-code "    \"ÃYƒ‚    ÃYƒ    ‚    [\\)‡" [n m % 0] 4))
  172.  
  173. (defun ring-ref (ring index) (byte-code "Ç    !ÈUƒÉÊ!‚.    @    A@    AAË\"Ë
  174. \\ G\" H-)‡" [numelts ring hd tl vec index vec-index ring-length 0 error "indexed empty ring" comint-mod] 6))
  175.  
  176. (defun comint-previous-input (arg) "\
  177. Cycle backwards through input history." (interactive "*p") (byte-code "LjȠ   !ÉXƒÊË!ˆÌ ‚xÍ ?ƒ$ÊÎ!ˆÌ ‚x Ï=ƒ2ÐÑ `\"‚^ Ò=ƒCÐÓÔp!!`\"‚^ÉVƒMՂXÉWƒWւXɉˆ×`!ˆØ \\\"‰ˆÊÙ T\"ˆÚ     \"cˆÏ‰)‡" [len input-ring t last-command input-ring-index arg this-command nil ring-length 0 message "Empty input ring" ding comint-after-pmark-p "Not after process mark" comint-previous-input delete-region mark comint-previous-similar-input process-mark get-buffer-process -1 1 push-mark comint-mod "%d" ring-ref] 17))
  178.  
  179. (defun comint-next-input (arg) "\
  180. Cycle forwards through input history." (interactive "*p") (byte-code "ÁˆÂ[!‡" [arg nil comint-previous-input] 2))
  181.  
  182. (defvar comint-last-input-match "" "\
  183. Last string searched for by comint input history search, for defaulting.
  184. Buffer local variable.")
  185.  
  186. (defun comint-previous-input-matching (str) "\
  187. Searches backwards through input history for substring match." (interactive (byte-code "ÃÄÅ
  188. \"!Æ    Ç\"ƒ
  189. ‚    C*‡" [last-command s comint-last-input-match read-from-minibuffer format "Command substring (default %s): " string= ""] 5)) (byte-code "ʈ ‰ˆË=?…̉ˆÍ !Î! Ï\\W…0Ð Ñ\"\"?…>Ï\\‰ˆ‚ˆWƒOË Z!‚`Ë=…Yˉ    ˆÒÓ!ˆÔ +‡" [last-command s comint-last-input-match str input-ring-index len input-ring n t this-command nil comint-previous-input -1 regexp-quote ring-length 1 string-match ring-ref message "Not found." ding] 8))
  190.  
  191. (defvar comint-last-similar-string "" "\
  192. The string last used in a similar string search.")
  193.  
  194. (defun comint-previous-similar-input (arg) "\
  195. Reenters the last input that matches the string typed so far.  If repeated 
  196. successively older inputs are reentered.  If arg is 1, it will go back
  197. in the history, if -1 it will go forward." (interactive "p") (byte-code "ʈˠ?… ÌÍ!ˆÎ=?…ÏÐÑÒp!!`\"‰ˆ
  198. GÓ!    \\Ê W…NÔ\"‰G W†NÕ
  199. Ö O\"?…]\\‰ˆ‚0ˆ Wƒ…‰ˆÎ=ƒx×Ø `\"‚{Ù`!ˆ ÊOc‚ÚÛ!ˆÜ ˆÝÞ!ˆÚß    T\",‡" [last-command input-ring-index comint-last-similar-string size len input-ring n arg entry t nil comint-after-pmark-p error "Not after process mark" comint-previous-similar-input -1 buffer-substring process-mark get-buffer-process ring-length ring-ref equal 0 delete-region mark push-mark message "Not found." ding sit-for 1 "%d"] 17))
  200.  
  201. (defun comint-send-input nil "\
  202. Send input to process.  After the process output mark, sends all text
  203. from the process mark to point as input to the process.  Before the process
  204. output mark, calls value of variable comint-get-old-input to retrieve old
  205. input, copies it to the process mark, and sends it.  A terminal newline is
  206. also inserted into the buffer and sent to the process.  In either case, value
  207. of variable comint-input-sentinel is called on the input before sending it.
  208. The input is entered into the input history ring, if the value of variable
  209. comint-input-filter returns non-nil when called on the input.
  210.  
  211. If variable comint-eol-on-send is non-nil, then point is moved to the end of
  212. line before sending the input.
  213.  
  214. comint-get-old-input, comint-input-sentinel, and comint-input-filter are chosen
  215. according to the command interpreter running in the buffer. E.g.,
  216. If the interpreter is the csh,
  217.     comint-get-old-input is the default: take the current line, discard any
  218.         initial string matching regexp comint-prompt-regexp.
  219.     comint-input-sentinel monitors input for \"cd\", \"pushd\", and \"popd\" 
  220.         commands. When it sees one, it cd's the buffer.
  221.     comint-input-filter is the default: returns T if the input isn't all white
  222.     space.
  223.  
  224. If the comint is Lucid Common Lisp, 
  225.     comint-get-old-input snarfs the sexp ending at point.
  226.     comint-input-sentinel does nothing.
  227.     comint-input-filter returns NIL if the input matches input-filter-regexp,
  228.         which matches (1) all whitespace (2) :a, :c, etc.
  229.  
  230. Similarly for Soar, Scheme, etc.." (interactive) (byte-code "̈Íp!?ƒÎÏ!‚fÐ!Ñ    !`
  231. Yƒ- …%Ò ˆÓ    `\"‚:Ô!    bˆcˆ)ÕcˆÔ \"…KÖ \"ˆÔ     \"ˆÔ
  232. #ˆ×Ð!`\"ˆ× `\"+)‡" [proc pmark pmark-val input comint-eol-on-send copy comint-get-old-input comint-input-filter input-ring comint-input-sentinel comint-input-sender comint-last-input-end nil get-buffer-process error "Current buffer has no process" process-mark marker-position end-of-line buffer-substring funcall 10 ring-insert set-marker] 16))
  233.  
  234. (defun comint-get-old-input-default nil "\
  235. Default for comint-get-old-input: take the current line, and discard
  236. any initial text matching comint-prompt-regexp." (byte-code "ŠÁ ˆÂ ˆ`àˆÄ`\"))‡" [beg beginning-of-line comint-skip-prompt end-of-line buffer-substring] 6))
  237.  
  238. (defun comint-skip-prompt nil "\
  239. Skip past the text matching regexp comint-prompt-regexp. 
  240. If this takes us past the end of the current line, don't skip at all." (byte-code "ŠÂ ˆ`)à   !…ÄÅ!X…ÄÅ!b)‡" [eol comint-prompt-regexp end-of-line looking-at match-end 0] 5))
  241.  
  242. (defun comint-after-pmark-p nil "\
  243. Is point after the process output marker?" (byte-code "ÁÂÃp!!!`X)‡" [proc-pos marker-position process-mark get-buffer-process] 5))
  244.  
  245. (defun comint-simple-send (proc string) "\
  246. Default function for sending to PROC input STRING.
  247. This just sends STRING plus a newline. To override this,
  248. set the hook COMINT-INPUT-SENDER." (byte-code "    \"ˆÂÃ\"‡" [proc string comint-send-string "
  249. "] 4))
  250.  
  251. (defun comint-bol (arg) "\
  252. Goes to the beginning of line, then skips past the prompt, if any.
  253. If a prefix argument is given (\\[universal-argument]), then no prompt skip 
  254. -- go straight to column 0.
  255.  
  256. The prompt skip is done by skipping text matching the regular expression
  257. comint-prompt-regexp, a buffer local variable.
  258.  
  259. If you don't like this command, reset c-a to beginning-of-line 
  260. in your hook, comint-mode-hook." (interactive "P") (byte-code "ÁˆÂ ˆ?… à‡" [arg nil beginning-of-line comint-skip-prompt] 3))
  261.  
  262. (defun comint-read-noecho (prompt &optional stars) "\
  263. Prompt the user with argument PROMPT. Read a single line of text
  264. without echoing, and return it. Note that the keystrokes comprising
  265. the text can still be recovered (temporarily) with \\[view-lossage]. This
  266. may be a security bug for some applications. Optional argument STARS
  267. causes input to be echoed with '*' characters on the prompt line." (byte-code "ÇÂÈÉ;?…ȉˆÊ!ˆr‰ËU†! ÌU?…? Í !P‰ˆ…7ÎP‰ˆÊ!ˆ‚ˆÊÈ!ˆ ,‡" [echo-keystrokes cursor-in-echo-area t answ tem prompt stars 0 "" nil message 13 10 char-to-string "*"] 5))
  268.  
  269. (defun send-invisible (str) "\
  270. Read a string without echoing, and send it to the process running
  271. in the current buffer. A new-line is additionally sent. String is not 
  272. saved on comint input history list.
  273. Security bug: your string can still be temporarily recovered with
  274. \\[view-lossage]." (interactive "P") (byte-code "ÈÄp!?ƒÅÆ!‚&Ç    ;ƒ    ‚ ÈÉÂ\"\"ˆÇÊ\")‡" [proc str t nil get-buffer-process error "Current buffer has no process" comint-send-string comint-read-noecho "Non-echoed text: " "
  275. "] 7))
  276.  
  277. (defvar comint-input-chunk-size 512 "\
  278. *Long inputs send to comint processes are broken up into chunks of this size.
  279. If your process is choking on big inputs, try lowering the value.")
  280.  
  281. (defun comint-send-string (proc str) "\
  282. Send PROCESS the contents of STRING as input.
  283. This is equivalent to process-send-string, except that long input strings
  284. are broken up into chunks of size comint-input-chunk-size. Processes
  285. are given a chance to output between chunks. This can help prevent processes
  286. from hanging when you send them long inputs on some OS's." (byte-code "    G ^Æ     Ç
  287. O\"ˆ
  288. W….
  289. \\È ˆÆ     
  290. ^O\"ˆ‰)ˆ‚*‡" [len str i comint-input-chunk-size proc next-i process-send-string 0 accept-process-output] 9))
  291.  
  292. (defun comint-send-region (proc start end) "\
  293. Sends to PROC the region delimited by START and END.
  294. This is a replacement for process-send-region that tries to keep
  295. your process from hanging on long inputs. See comint-send-string." (byte-code "ÃÄ    
  296. \"\"‡" [proc start end comint-send-string buffer-substring] 5))
  297.  
  298. (defun comint-kill-output nil "\
  299. Kill all output from interpreter since last input." (interactive) (byte-code "ˆÃÄp!!Å    \"ˆbˆÆcˆÇ`\")‡" [pmark comint-last-input-end nil process-mark get-buffer-process kill-region "*** output flushed ***
  300. " set-marker] 6))
  301.  
  302. (defun comint-show-output nil "\
  303. Display start of this batch of interpreter output at top of window.
  304. Also put cursor there." (interactive) (byte-code "ÁˆbˆÂ ˆÃ ˆÄÅ `\"ˆÆ ‡" [comint-last-input-end nil backward-char beginning-of-line set-window-start selected-window end-of-line] 6))
  305.  
  306. (defun comint-interrupt-subjob nil "\
  307. Interrupt the current subjob." (interactive) (byte-code "ÀˆÂÀ    \"‡" [nil comint-ptyp interrupt-process] 3))
  308.  
  309. (defun comint-kill-subjob nil "\
  310. Send kill signal to the current subjob." (interactive) (byte-code "ÀˆÂÀ    \"‡" [nil comint-ptyp kill-process] 3))
  311.  
  312. (defun comint-quit-subjob nil "\
  313. Send quit signal to the current subjob." (interactive) (byte-code "ÀˆÂÀ    \"‡" [nil comint-ptyp quit-process] 3))
  314.  
  315. (defun comint-stop-subjob nil "\
  316. Stop the current subjob.
  317. WARNING: if there is no current subjob, you can end up suspending
  318. the top-level process running in the buffer. If you accidentally do
  319. this, use \\[comint-continue-subjob] to resume the process. (This
  320. is not a problem with most shells, since they ignore this signal.)" (interactive) (byte-code "ÀˆÂÀ    \"‡" [nil comint-ptyp stop-process] 3))
  321.  
  322. (defun comint-continue-subjob nil "\
  323. Send CONT signal to process buffer's process group.
  324. Useful if you accidentally suspend the top-level process." (interactive) (byte-code "ÀˆÂÀ    \"‡" [nil comint-ptyp continue-process] 3))
  325.  
  326. (defun comint-kill-input nil "\
  327. Kill all text from last stuff output by interpreter to point." (interactive) (byte-code "ˆÃÄp!!Å!`    V…Æ`\"*‡" [pmark p-pos nil process-mark get-buffer-process marker-position kill-region] 6))
  328.  
  329. (defun comint-delchar-or-maybe-eof (arg) "\
  330. Delete ARG characters forward, or send an EOF to process if at end of buffer." (interactive "p") (byte-code "Áˆmƒ  ‚Ã!‡" [arg nil process-send-eof delete-char] 3))
  331.  
  332. (defun comint-source-default (previous-dir/file source-modes) (byte-code "…    
  333. >ƒÇ!È!B‚ †ÆB‡" [buffer-file-name major-mode source-modes previous-dir/file t default-directory nil file-name-directory file-name-nondirectory] 4))
  334.  
  335. (defun comint-check-source (fname) (byte-code "à   !…Ä!…ÅÆÇÈ!\"!…$pqˆÉ ˆ
  336. q))‡" [buff fname old-buffer get-file-buffer buffer-modified-p y-or-n-p format "Save buffer %s first? " buffer-name save-buffer] 7))
  337.  
  338. (defun comint-extract-string nil "\
  339. Returns string around point that starts the current line or nil." (byte-code "Š`Æ ˆ`Ç ˆ`bˆÈÉ    Ä#…`TbˆÊÉ
  340. Ä#…(`S …5…5Ë \"-)‡" [point bol eol start t end beginning-of-line end-of-line search-backward "\"" search-forward buffer-substring] 7))
  341.  
  342. (defun comint-get-source (prompt prev-dir/file source-modes mustmatch-p) (byte-code "Ê    
  343. \"Ë  …ÌÍΏ…Ï !? ƒ\"Ð !‚$@ ƒ/Ñ !‚1AÒƒCÓÔ#‚EP    $ÕÖ!!C.‡" [def prev-dir/file source-modes stringfile sfile-p defdir deffile ans prompt mustmatch-p comint-source-default comint-extract-string nil (byte-code "Á!‡" [stringfile file-exists-p] 2) ((error (byte-code "À‡" [nil] 1))) file-directory-p file-name-directory file-name-nondirectory read-file-name format "%s(default %s) " expand-file-name substitute-in-file-name] 11))
  344.  
  345. (defun comint-proc-query (proc str) (byte-code "Ç    !È    !É!ˆqˆÊ!Ë
  346. !Ì    \"ˆÍ    !ˆÎ \"?…LÏ !Ð
  347. \"ˆÑÒ!ˆÎ \"?ƒFÓ!‚KÐ \")**‡" [proc-buf proc proc-mark proc-win proc-pt str opoint process-buffer process-mark display-buffer get-buffer-window marker-position comint-send-string accept-process-output pos-visible-in-window-p window-point set-window-point sit-for 0 push-mark] 16))
  348.  
  349. (defun comint-match-partial-pathname nil "\
  350. Returns the filename at point or causes an error." (byte-code "ŠÁÂÀÃ#… ÄÅ!ˆÆÇ!?…ÈÉ!ˆÊË!ˆÌÍÎÏ!ÐÏ!\"!)‡" [nil re-search-backward "[^~/A-Za-z0-9---_.$#,=]" move forward-char 1 looking-at "[~/A-Za-z0-9---_.$#,=]" error "" re-search-forward "[~/A-Za-z0-9---_.$#,=]+" substitute-in-file-name buffer-substring match-beginning 0 match-end] 11))
  351.  
  352. (defun comint-replace-by-expanded-filename nil "\
  353. Replace the filename at point with an expanded, canonicalised, and
  354. completed replacement.
  355. \"Expanded\" means environment variables (e.g., $HOME) and ~'s are
  356. replaced with the corresponding directories.  \"Canonicalised\" means ..
  357. and . are removed, and the filename is made absolute instead of relative.
  358. See functions expand-file-name and substitute-in-file-name. See also
  359. comint-dynamic-complete." (interactive) (byte-code "ƈǠÈ!É!Ê
  360.     † \" ?ƒ%ËÌ\"ˆÍ ‚@ Å=ƒ1ËÎ!‚@ÏÐÑ!ÒÑ!\"ˆÓ     P!c,‡" [pathname pathdir pathnondir completion default-directory t nil comint-match-partial-pathname file-name-directory file-name-nondirectory file-name-completion message "No completions of %s." ding "Unique completion." delete-region match-beginning 0 match-end expand-file-name] 13))
  361.  
  362. (defun comint-dynamic-complete nil "\
  363. Dynamically complete the filename at point.
  364. This function is similar to comint-replace-by-expanded-filename, except
  365. that it won't change parts of the filename already entered in the buffer; 
  366. it just adds completion characters to the end of the filename." (interactive) (byte-code "ƈǠÈ!É!Ê
  367.     † \" ?ƒ%ËÌ\"ˆÍ ‚< Å=ƒ1ËÎ!‚<ÏÐ!bˆ
  368. GÆOc,‡" [pathname pathdir pathnondir completion default-directory t nil comint-match-partial-pathname file-name-directory file-name-nondirectory file-name-completion message "No completions of %s." ding "Unique completion." match-end 0] 11))
  369.  
  370. (defun comint-dynamic-list-completions nil "\
  371. List in help buffer all possible completions of the filename at point." (interactive) (byte-code "ɈʠË!Ì!Í
  372.     † \" ?ƒ%ÎÏ\"ˆÐ ‚PÑ ÒÓ !‘ˆÔÕ!ˆÎÖ!ˆr×UƒIØ!‚N‰)),‡" [pathname pathdir pathnondir completions default-directory t conf ch unread-command-char nil comint-match-partial-pathname file-name-directory file-name-nondirectory file-name-all-completions message "No completions of %s." ding current-window-configuration "*Help*" display-completion-list sit-for 0 "Hit space to flush." 32 set-window-configuration] 13))
  373.  
  374. (defvar comint-load-hook nil "\
  375. This hook is run when comint is loaded in.
  376. This is a good place to put keybindings.")
  377.  
  378. (run-hooks (quote comint-load-hook))
  379.